package org.hcyspartnoc.luoxin.mapper.searchtopic;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.hcyspartnoc.luoxin.pojo.dto.searchtopic.QuestionSearchDto;
import org.hcyspartnoc.luoxin.pojo.po.searchtopic.QuestionOptionPo;
import org.hcyspartnoc.luoxin.pojo.po.searchtopic.QuestionPo;
import org.hcyspartnoc.luoxin.pojo.vo.searchtopic.QuestionTypesVO;
import org.hcyspartnoc.luoxin.pojo.vo.searchtopic.QuestionVo;

import java.util.List;

@Mapper
public interface QuestionMapper {
    Integer insertQuestion(QuestionPo questionPo);

    void updateQuestion(QuestionPo questionPo);

    List<QuestionVo> queryQuestion(QuestionSearchDto questionSearchDto);

    List<QuestionTypesVO> getQuestionTypes();

    void insertOptions(@Param("question") QuestionPo questionPo);

    void insertQuestionsByExcel(List<QuestionPo> questionPoList);

    void updateQuestionOption(QuestionPo.QuestionOptions questionPo);

    QuestionPo getQuestion(Long questionId);

    List<QuestionOptionPo> getQuestionOption(QuestionPo questionPo);

    int deleteQuestion(Long questionId);

    int deleteQuestionOption(Long questionId);
}
